1. Field of Invention
The present application is directed towards systems and methods for decoding bar codes.
2. Description of Related Art
Machine-readable symbols, often referred to as barcodes, are widely seen in daily life. They usually provide information about market products, parcels, tickets, etc. One type of bar code is the one-dimensional (1D) barcode made up straight dark lines with varying width and spaced at varying intervals. Information is encoded in the width of the bars and in the width of the spaces. FIG. 1 is an illustration of a meal ticket that includes a bar code. There exists a number of methods to locate and decode 1D and 2D barcodes.
One such method of decoding a bar code is described in U.S. patent application Ser. No. 10/390,596 by Sanchin ARGAWAL et al. Decoding a bar code may include scanning an image line-by-line without knowing where the barcode is. Each horizontal scan-line may be segmented into a sequence of black or white pixel groups. Each pixel group may be identified as a token. The segmenting step is referred to as tokenization. Tokenization which consists of converting the image pixel to either black or white (non-black) and grouping continuous black or white pixels together. A bar token may be defined as a group of adjacent black pixels. While a space token may be defined as a group of adjacent white pixels. A bar may be denoted by a zero and a space may be denoted by a one, the image of the current scan line may be converted to an array of zeroes and ones. The width of each token may be measured in units of image pixels and used to decode the bar code.
Prior art methods work well when each token contains a large number of pixels (e.g. 10 or more) and the error introduced by rounding the token width to a whole number of pixels is negligible. However, if the resolution of the scanner used to acquire the barcode image is less than the resolution of the printing device, the token width in image pixels decreases accordingly. As a result, the rounding error may become comparable to the token width. The ratio between the width of wide and narrow tokens can become distorted. This ratio is a key element in the decoding process. Additionally, the effects of noise due either to the image process or the image itself can cause errors in the decoding process. An error of just one pixel can make a big difference.
FIG. 2 is an illustration of a noisy bar-code which prior art methods have trouble decoding.
The present invention is directed towards systems and methods for decoding bar codes when the image of the bar code is noisy or has low resolution relative to the pitch of the bar code.